/*
 * Copyright (C) 2010-2010 MaoJian Wu
 *
 * Author:
 *	MaoJian Wu
 *
 * Source:
 *	
 *
 * This file is a part of zfspear library.
 *
 *
 */

#include "xmpp_configuration.h"

XmppConfiguration::XmppConfiguration()
{
}
QString XmppConfiguration::host() {
    return host_;
}

void XmppConfiguration::set_host(const QString& host) {
    host_=host;
}

int XmppConfiguration::port() {
    return port_;
}

void XmppConfiguration::set_port(int port) {
    port_=port;
}

QString XmppConfiguration::user() {
    return user_;
}

void XmppConfiguration::set_user(const QString& user) {
    user_=user;
}

QString XmppConfiguration::passwd() {
    return passwd_;
}

void XmppConfiguration::set_passwd(const QString& passwd) {
    passwd_=passwd;
}

QString XmppConfiguration::domain() {
    return domain_;
}

void XmppConfiguration::set_domain(const QString& domain) {
    domain_=domain;
}

QString XmppConfiguration::resource() {
    return resource_;
}

void XmppConfiguration::set_resource(const QString& resource) {
    resource_=resource;
}
QString XmppConfiguration::GetJid() const
{
    return GetJidBare() + "/" + resource_;
}

QString XmppConfiguration::GetJidBare() const
{
    return user_+"@"+domain_;
}
void XmppConfiguration::SetShowType(Presence::ShowType showType) {
    showType_=showType;
}

Presence::ShowType XmppConfiguration::GetShowType() {
    return showType_;
}

void XmppConfiguration::SetPresenceStatus(const QString& status) {
    presence_status_=status;
}

QString XmppConfiguration::GetPresenceStatus() {
    return presence_status_;
}
